.class final Lcom/greystripe/sdk/bm;
.super Ljava/lang/Object;


# static fields
.field private static a:Landroid/os/Handler;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    sput-object v0, Lcom/greystripe/sdk/bm;->a:Landroid/os/Handler;

    return-void
.end method

.method public static a()V
    .locals 4

    sget-object v0, Lcom/greystripe/sdk/bm;->a:Landroid/os/Handler;

    if-nez v0, :cond_1

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Thread;->getId()J

    move-result-wide v0

    const-wide/16 v2, 0x1

    cmp-long v0, v0, v2

    if-eqz v0, :cond_0

    const-string v0, "Initializing UiThreadHandler from a non-UI Thread!"

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/Object;

    invoke-static {v0, v1}, Lcom/greystripe/sdk/bd;->e(Ljava/lang/String;[Ljava/lang/Object;)V

    :cond_0
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    sput-object v0, Lcom/greystripe/sdk/bm;->a:Landroid/os/Handler;

    :cond_1
    return-void
.end method

.method public static a(Ljava/lang/Runnable;)Z
    .locals 1

    sget-object v0, Lcom/greystripe/sdk/bm;->a:Landroid/os/Handler;

    invoke-virtual {v0, p0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    move-result v0

    return v0
.end method
